package generator.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName b_comment
 */
public class Comment implements Serializable {
    /**
     * 
     */
    private String id;

    /**
     * 评论商品
     */
    private String goodsid;

    /**
     * 评论人id
     */
    private String userid;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 评论日期
     */
    private Date addate;

    /**
     * 点赞数
     */
    private Integer agrees;

    /**
     * 上级评论
     */
    private String pid;

    /**
     * 审核状态(1.待审核,2.审核通过,)
     */
    private Integer status;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public String getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 评论商品
     */
    public String getGoodsid() {
        return goodsid;
    }

    /**
     * 评论商品
     */
    public void setGoodsid(String goodsid) {
        this.goodsid = goodsid;
    }

    /**
     * 评论人id
     */
    public String getUserid() {
        return userid;
    }

    /**
     * 评论人id
     */
    public void setUserid(String userid) {
        this.userid = userid;
    }

    /**
     * 评论内容
     */
    public String getContent() {
        return content;
    }

    /**
     * 评论内容
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 评论日期
     */
    public Date getAddate() {
        return addate;
    }

    /**
     * 评论日期
     */
    public void setAddate(Date addate) {
        this.addate = addate;
    }

    /**
     * 点赞数
     */
    public Integer getAgrees() {
        return agrees;
    }

    /**
     * 点赞数
     */
    public void setAgrees(Integer agrees) {
        this.agrees = agrees;
    }

    /**
     * 上级评论
     */
    public String getPid() {
        return pid;
    }

    /**
     * 上级评论
     */
    public void setPid(String pid) {
        this.pid = pid;
    }

    /**
     * 审核状态(1.待审核,2.审核通过,)
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 审核状态(1.待审核,2.审核通过,)
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Comment other = (Comment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGoodsid() == null ? other.getGoodsid() == null : this.getGoodsid().equals(other.getGoodsid()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getAddate() == null ? other.getAddate() == null : this.getAddate().equals(other.getAddate()))
            && (this.getAgrees() == null ? other.getAgrees() == null : this.getAgrees().equals(other.getAgrees()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGoodsid() == null) ? 0 : getGoodsid().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getAddate() == null) ? 0 : getAddate().hashCode());
        result = prime * result + ((getAgrees() == null) ? 0 : getAgrees().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", goodsid=").append(goodsid);
        sb.append(", userid=").append(userid);
        sb.append(", content=").append(content);
        sb.append(", addate=").append(addate);
        sb.append(", agrees=").append(agrees);
        sb.append(", pid=").append(pid);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}